<script setup lang="ts">
interface Props {
  imageUrl: string
  size?:number
  title?: string
}
const props = defineProps<Props>()
</script>

<template>
<a-avatar v-if="props.imageUrl !=='' " :image-url="props.imageUrl" :size="props.size"></a-avatar>
<a-avatar class="f_avatar" v-else :size="props.size">{{ (props.title as string).length > 0 ? (props.title as string)[0] : '' }} </a-avatar>
</template>

<style lang="less">
.f_avatar{
  background-color: #00ae9e;
  color: white;
  font-size: 16px;
}
</style>